/*
 * @Description: 自定义主进程方法文件
 * @Date: 2024-09-30 11:23:04
 * @FilePath: \demod:\12electron\b站向军课程\electron-camera\src\main\ipcMain.ts
 */

import { app, ipcMain, Menu, MenuItemConstructorOptions } from 'electron'

ipcMain.on('rightBtnClick', () => {
  const template = [
    {
      label: '退出',
      click: () => {
        app.quit()
      }
    }
  ] as MenuItemConstructorOptions[]

  const menu = Menu.buildFromTemplate(template)
  menu.popup()
})
